\(\int \frac {\sec ^2(e+f x)}{(a+b \sec ^2(e+f x))^{5/2}} \, dx\) [291]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 25, antiderivative size = 71 \[ \int \frac {\sec ^2(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^{5/2}} \, dx=\frac {\tan (e+f x)}{3 (a+b) f \left (a+b+b \tan ^2(e+f x)\right )^{3/2}}+\frac {2 \tan (e+f x)}{3 (a+b)^2 f \sqrt {a+b+b \tan ^2(e+f x)}} \]

[Out]

2/3*tan(f*x+e)/(a+b)^2/f/(a+b+b*tan(f*x+e)^2)^(1/2)+1/3*tan(f*x+e)/(a+b)/f/(a+b+b*tan(f*x+e)^2)^(3/2)

Rubi [A] (verified)

Time = 0.10 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.120, Rules used = {4231, 198, 197} \[ \int \frac {\sec ^2(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^{5/2}} \, dx=\frac {2 \tan (e+f x)}{3 f (a+b)^2 \sqrt {a+b \tan ^2(e+f x)+b}}+\frac {\tan (e+f x)}{3 f (a+b) \left (a+b \tan ^2(e+f x)+b\right )^{3/2}} \]

[In]

Int[Sec[e + f*x]^2/(a + b*Sec[e + f*x]^2)^(5/2),x]

[Out]

Tan[e + f*x]/(3*(a + b)*f*(a + b + b*Tan[e + f*x]^2)^(3/2)) + (2*Tan[e + f*x])/(3*(a + b)^2*f*Sqrt[a + b + b*T
an[e + f*x]^2])

Rule 197

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[x*((a + b*x^n)^(p + 1)/a), x] /; FreeQ[{a, b, n, p}, x] &
& EqQ[1/n + p + 1, 0]

Rule 198

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(-x)*((a + b*x^n)^(p + 1)/(a*n*(p + 1))), x] + Dist[(n*(p
 + 1) + 1)/(a*n*(p + 1)), Int[(a + b*x^n)^(p + 1), x], x] /; FreeQ[{a, b, n, p}, x] && ILtQ[Simplify[1/n + p +
 1], 0] && NeQ[p, -1]

Rule 4231

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_), x_Symbol] :> With[{ff = Fre
eFactors[Tan[e + f*x], x]}, Dist[ff/f, Subst[Int[(1 + ff^2*x^2)^(m/2 - 1)*ExpandToSum[a + b*(1 + ff^2*x^2)^(n/
2), x]^p, x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[m/2] && IntegerQ[n/2]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {1}{\left (a+b+b x^2\right )^{5/2}} \, dx,x,\tan (e+f x)\right )}{f} \\ & = \frac {\tan (e+f x)}{3 (a+b) f \left (a+b+b \tan ^2(e+f x)\right )^{3/2}}+\frac {2 \text {Subst}\left (\int \frac {1}{\left (a+b+b x^2\right )^{3/2}} \, dx,x,\tan (e+f x)\right )}{3 (a+b) f} \\ & = \frac {\tan (e+f x)}{3 (a+b) f \left (a+b+b \tan ^2(e+f x)\right )^{3/2}}+\frac {2 \tan (e+f x)}{3 (a+b)^2 f \sqrt {a+b+b \tan ^2(e+f x)}} \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(215\) vs. \(2(71)=142\).

Time = 6.14 (sec) , antiderivative size = 215, normalized size of antiderivative = 3.03 \[ \int \frac {\sec ^2(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^{5/2}} \, dx=\frac {(3 a+b) (a+2 b+a \cos (2 e+2 f x))^{5/2} \sec ^5(e+f x) \left (\frac {\sqrt {2} \sin (e+f x)}{(a+b) \left (a+b-a \sin ^2(e+f x)\right )^{3/2}}+\frac {2 \sqrt {2} \sin (e+f x)}{(a+b)^2 \sqrt {a+b-a \sin ^2(e+f x)}}\right )}{48 a f \left (a+b \sec ^2(e+f x)\right )^{5/2}}-\frac {(a+2 b+a \cos (2 e+2 f x))^{5/2} \sec ^4(e+f x) \tan (e+f x)}{8 \sqrt {2} a f \left (a+b \sec ^2(e+f x)\right )^{5/2} \left (a+b-a \sin ^2(e+f x)\right )^{3/2}} \]

[In]

Integrate[Sec[e + f*x]^2/(a + b*Sec[e + f*x]^2)^(5/2),x]

[Out]

((3*a + b)*(a + 2*b + a*Cos[2*e + 2*f*x])^(5/2)*Sec[e + f*x]^5*((Sqrt[2]*Sin[e + f*x])/((a + b)*(a + b - a*Sin
[e + f*x]^2)^(3/2)) + (2*Sqrt[2]*Sin[e + f*x])/((a + b)^2*Sqrt[a + b - a*Sin[e + f*x]^2])))/(48*a*f*(a + b*Sec
[e + f*x]^2)^(5/2)) - ((a + 2*b + a*Cos[2*e + 2*f*x])^(5/2)*Sec[e + f*x]^4*Tan[e + f*x])/(8*Sqrt[2]*a*f*(a + b
*Sec[e + f*x]^2)^(5/2)*(a + b - a*Sin[e + f*x]^2)^(3/2))

Maple [A] (verified)

Time = 3.12 (sec) , antiderivative size = 84, normalized size of antiderivative = 1.18

method result size
default \(\frac {\left (3 a \cos \left (f x +e \right )^{2}+\cos \left (f x +e \right )^{2} b +2 b \right ) \left (b +a \cos \left (f x +e \right )^{2}\right ) \tan \left (f x +e \right ) \sec \left (f x +e \right )^{4}}{3 f \left (a^{2}+2 a b +b^{2}\right ) \left (a +b \sec \left (f x +e \right )^{2}\right )^{\frac {5}{2}}}\) \(84\)

[In]

int(sec(f*x+e)^2/(a+b*sec(f*x+e)^2)^(5/2),x,method=_RETURNVERBOSE)

[Out]

1/3/f/(a^2+2*a*b+b^2)*(3*a*cos(f*x+e)^2+cos(f*x+e)^2*b+2*b)*(b+a*cos(f*x+e)^2)/(a+b*sec(f*x+e)^2)^(5/2)*tan(f*
x+e)*sec(f*x+e)^4

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 134 vs. \(2 (63) = 126\).

Time = 0.38 (sec) , antiderivative size = 134, normalized size of antiderivative = 1.89 \[ \int \frac {\sec ^2(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^{5/2}} \, dx=\frac {{\left ({\left (3 \, a + b\right )} \cos \left (f x + e\right )^{3} + 2 \, b \cos \left (f x + e\right )\right )} \sqrt {\frac {a \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}} \sin \left (f x + e\right )}{3 \, {\left ({\left (a^{4} + 2 \, a^{3} b + a^{2} b^{2}\right )} f \cos \left (f x + e\right )^{4} + 2 \, {\left (a^{3} b + 2 \, a^{2} b^{2} + a b^{3}\right )} f \cos \left (f x + e\right )^{2} + {\left (a^{2} b^{2} + 2 \, a b^{3} + b^{4}\right )} f\right )}} \]

[In]

integrate(sec(f*x+e)^2/(a+b*sec(f*x+e)^2)^(5/2),x, algorithm="fricas")

[Out]

1/3*((3*a + b)*cos(f*x + e)^3 + 2*b*cos(f*x + e))*sqrt((a*cos(f*x + e)^2 + b)/cos(f*x + e)^2)*sin(f*x + e)/((a
^4 + 2*a^3*b + a^2*b^2)*f*cos(f*x + e)^4 + 2*(a^3*b + 2*a^2*b^2 + a*b^3)*f*cos(f*x + e)^2 + (a^2*b^2 + 2*a*b^3
 + b^4)*f)

Sympy [F]

\[ \int \frac {\sec ^2(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^{5/2}} \, dx=\int \frac {\sec ^{2}{\left (e + f x \right )}}{\left (a + b \sec ^{2}{\left (e + f x \right )}\right )^{\frac {5}{2}}}\, dx \]

[In]

integrate(sec(f*x+e)**2/(a+b*sec(f*x+e)**2)**(5/2),x)

[Out]

Integral(sec(e + f*x)**2/(a + b*sec(e + f*x)**2)**(5/2), x)

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 61, normalized size of antiderivative = 0.86 \[ \int \frac {\sec ^2(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^{5/2}} \, dx=\frac {\frac {2 \, \tan \left (f x + e\right )}{\sqrt {b \tan \left (f x + e\right )^{2} + a + b} {\left (a + b\right )}^{2}} + \frac {\tan \left (f x + e\right )}{{\left (b \tan \left (f x + e\right )^{2} + a + b\right )}^{\frac {3}{2}} {\left (a + b\right )}}}{3 \, f} \]

[In]

integrate(sec(f*x+e)^2/(a+b*sec(f*x+e)^2)^(5/2),x, algorithm="maxima")

[Out]

1/3*(2*tan(f*x + e)/(sqrt(b*tan(f*x + e)^2 + a + b)*(a + b)^2) + tan(f*x + e)/((b*tan(f*x + e)^2 + a + b)^(3/2
)*(a + b)))/f

Giac [F]

\[ \int \frac {\sec ^2(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^{5/2}} \, dx=\int { \frac {\sec \left (f x + e\right )^{2}}{{\left (b \sec \left (f x + e\right )^{2} + a\right )}^{\frac {5}{2}}} \,d x } \]

[In]

integrate(sec(f*x+e)^2/(a+b*sec(f*x+e)^2)^(5/2),x, algorithm="giac")

[Out]

sage0*x

Mupad [B] (verification not implemented)

Time = 30.12 (sec) , antiderivative size = 172, normalized size of antiderivative = 2.42 \[ \int \frac {\sec ^2(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^{5/2}} \, dx=-\frac {\left ({\mathrm {e}}^{e\,4{}\mathrm {i}+f\,x\,4{}\mathrm {i}}-1\right )\,\sqrt {a+\frac {b}{{\left (\frac {{\mathrm {e}}^{-e\,1{}\mathrm {i}-f\,x\,1{}\mathrm {i}}}{2}+\frac {{\mathrm {e}}^{e\,1{}\mathrm {i}+f\,x\,1{}\mathrm {i}}}{2}\right )}^2}}\,\left (a\,3{}\mathrm {i}+b\,1{}\mathrm {i}+a\,{\mathrm {e}}^{e\,2{}\mathrm {i}+f\,x\,2{}\mathrm {i}}\,6{}\mathrm {i}+a\,{\mathrm {e}}^{e\,4{}\mathrm {i}+f\,x\,4{}\mathrm {i}}\,3{}\mathrm {i}+b\,{\mathrm {e}}^{e\,2{}\mathrm {i}+f\,x\,2{}\mathrm {i}}\,10{}\mathrm {i}+b\,{\mathrm {e}}^{e\,4{}\mathrm {i}+f\,x\,4{}\mathrm {i}}\,1{}\mathrm {i}\right )}{3\,f\,{\left (a+b\right )}^2\,{\left (a+2\,a\,{\mathrm {e}}^{e\,2{}\mathrm {i}+f\,x\,2{}\mathrm {i}}+a\,{\mathrm {e}}^{e\,4{}\mathrm {i}+f\,x\,4{}\mathrm {i}}+4\,b\,{\mathrm {e}}^{e\,2{}\mathrm {i}+f\,x\,2{}\mathrm {i}}\right )}^2} \]

[In]

int(1/(cos(e + f*x)^2*(a + b/cos(e + f*x)^2)^(5/2)),x)

[Out]

-((exp(e*4i + f*x*4i) - 1)*(a + b/(exp(- e*1i - f*x*1i)/2 + exp(e*1i + f*x*1i)/2)^2)^(1/2)*(a*3i + b*1i + a*ex
p(e*2i + f*x*2i)*6i + a*exp(e*4i + f*x*4i)*3i + b*exp(e*2i + f*x*2i)*10i + b*exp(e*4i + f*x*4i)*1i))/(3*f*(a +
 b)^2*(a + 2*a*exp(e*2i + f*x*2i) + a*exp(e*4i + f*x*4i) + 4*b*exp(e*2i + f*x*2i))^2)